<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>list_result.jsp</title>
</head>
<body>
<%
	int xv = Integer.parseInt(request.getParameter("xv"));
	int yv = Integer.parseInt(request.getParameter("yv"));

	if(xv>yv)
	{
		int i = xv;
		xv = yv;
		yv = i;
	}
%>
<%!	//선언문을 의미함.
	public String list(int x, int y)
	{
		String str="";
		for(;x<=y;x++)
		{
			str +=x;
			if(x!=y)
				str+="<br>";
		}
		return str;
	}
%>
	<div class=title>입력 결과 출력</div>
 		<%=xv%> 부터 <%=yv%> 까지의 출력문입니다
 		
	<input type=button value="다시입력" id='returnBtn'
		onclick = "location.href='main.jsp?inc=./jsp/list.jsp'"> 
 		<hr>
 		<%=list(xv, yv) %>
 		

</body>
</html>